]> dgit.raspbian.org Git - gnome-shell.git/commit
StButton: fix hover and grab tracking
authorDan Winship <danw@gnome.org>
Tue, 2 Nov 2010 17:24:29 +0000 (13:24 -0400)
committerDan Winship <danw@gnome.org>
Mon, 8 Nov 2010 18:06:41 +0000 (13:06 -0500)
commit4f1f2268289aa23a8998f9ac3360985c8a55ddc5
treef3e841d2210367df9f42f7abdda91fccd05275a1
parent4c6dd64e8751419adefa5441a3960744f602e2c8
StButton: fix hover and grab tracking

Use StWidget:track-hover rather than doing it ourselves. Don't assume
that hover is always TRUE after an enter_event or FALSE after a
leave_event, since we have a pointer grab and will be getting other
actors' events.

Don't ungrab the pointer when it leaves the button, since that
destroys the whole point of getting a grab in the first place.

Only consider the button to have been clicked when it has both grab
(meaning the mouse was pressed over the button) and hover (meaning the
mouse was released over the button).

Also remove the virtual pressed/released methods, which weren't being
used anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=633853
src/st/st-button.c
src/st/st-button.h